import request from '@/router/axios';
// 查看时，查看图号申请得详情记录'
export const getApplicationDetailList = (applicationId) => {
  return request({
    url:'/api/data-drawing-number-application/drawingnumberapplication/getDrawingApplicationDetailList',
    method:'get',
    params:{
      applicationId
    }
  })
}

export const getLoginUserInfo = () => {
  return request({
    url: '/api/data-drawing-number-application/drawingnumberapplication/getDrawingPersonInfo',
    method:'get',
  })
}


export const getList = (current, size, params) => {
  return request({
    url: '/api/data-drawing-number-application/drawingnumberapplication/list',
    method: 'get',
    params: {
      ...params,
      current,
      size,
    }
  })
}

export const getDetail = (id) => {
  return request({
    url: '/api/data-drawing-number-application/drawingnumberapplication/detail',
    method: 'get',
    params: {
      id
    }
  })
}

export const remove = (ids) => {
  return request({
    url: '/api/data-drawing-number-application/drawingnumberapplication/remove',
    method: 'post',
    params: {
      ids,
    }
  })
}
// 新增图号申请，同时生成相应的详情列表
export const add = (row) => {
  return request({
    url: '/api/data-drawing-number-application/drawingnumberapplication/save',
    method: 'post',
    data: row
  })
}

export const update = (row) => {
  return request({
    url: '/api/data-drawing-number-application/drawingnumberapplication/submit',
    method: 'post',
    data: row
  })
}

